static int in_gs_terr;
static int in_gs_log;
static int in_gs_log_wpt;
+static int in_gs_tbugs;
static int in_something_else;
static xml_tag *cur_tag;
static char *cdatastr;
in_something_else++;
start_something_else( el, attr );
}
+ else if (strcmp(el, "groundspeak:travelbugs") == 0) {
+ in_gs_tbugs++;
+ in_something_else++;
+ start_something_else( el, attr );
+ }
else if (in_wpt) {
in_something_else++;
start_something_else( el, attr );
{
float x;
if (in_cdata) {
- if (in_name && in_wpt) {
+ if (in_name && in_wpt && !in_gs_tbugs) {
wpt_tmp->shortname = xstrdup(cdatastr);
}
if (gsshortnames) {
- if (in_gs_name && in_wpt) {
+ if (in_gs_name && in_wpt && !in_gs_tbugs) {
wpt_tmp->notes = xstrdup(cdatastr);
}
} else {
in_gs_log_wpt--;
in_something_else--;
end_something_else();
+ } else if (strcmp(el, "groundspeak:travelbugs") == 0) {
+ in_gs_tbugs--;
+ in_something_else--;
+ end_something_else();
} else if (in_wpt) {
in_something_else--;
end_something_else();
wpt_tmp->position.altitude.altitude_meters = wpt_alt;
wpt_tmp->position.latitude.degrees = -wpt_lat;
wpt_tmp->position.longitude.degrees = wpt_long;
- sprintf(tbuf, "%c", wpt_icon + 'a');
+
+ if (wpt_icon < 26)
+ sprintf(tbuf, "%c", wpt_icon + 'a');
+ else
+ sprintf(tbuf, "a%c", wpt_icon - 27 + 'a');
wpt_tmp->icon_descr = mag_find_descr_from_token(tbuf);
waypt_add(wpt_tmp);
if (waypointp->icon_descr) {
iconp = mag_find_token_from_descr(waypointp->icon_descr);
- n = iconp[0] - 'a';
+ if (1 == strlen(iconp)) {
+ n = iconp[0] - 'a';
+ } else {
+ n = iconp[1] - 'a' + 27;
+ }
} else {
n = 0;
}